package day05;
import java.util.Scanner;
public class anli5 {
	 public static void main(String[] args){
		 Scanner sc=new Scanner(System.in);
		 String username = null;
		 String password = null;
		 while (true){
				System.out.println("*********菜单************\n1.注册\n2.登录\n3.退出\n*********************\n");
		 	 int id =sc.nextInt();
		 	switch(id) {
		 	case 1:
		 		System.out.println("请输入用户名");
		 		username=sc.next();
		 		System.out.println("请输入密码");
		 		password=sc.next();
		 		System.out.println("注册成功");
		 		break;
		 	case 2 :
		 		System.out.println("请输入用户名");
		 		String user=sc.next();
		 		System.out.println("请输入密码");
		 		String pass=sc.next();
		 		if(username.equals(user) && password.equals(pass)) {
		 			System.out.println("登录成功");
		 		}else {
		 		System.out.println("登录成功");
		 		break;
		 	}
		 	if(id == 3) {
		 		System.out.println("退出成功");
		 	}
	 }
	 }
}
}

